﻿//===============================================================================
// Microsoft patterns & practices
// Windows Phone 7 Developer Guide
//===============================================================================
// Copyright © Microsoft Corporation.  All rights reserved.
// This code released under the terms of the 
// Microsoft patterns & practices license (http://wp7guide.codeplex.com/license)
//===============================================================================


namespace AzureToolkit
{
    using System;
    using System.Collections.Generic;

    public interface IAzureBlobContainer<T> : IInitializer
    {
        /// <summary>
        /// Saves the specified object.
        /// </summary>
        /// <param name="objId">The object id.</param>
        /// <param name="obj">The object.</param>
        void Save(string objId, T obj);

        /// <summary>
        /// Saves the document asyncronously.
        /// </summary>
        /// <param name="objId">The obj id.</param>
        /// <param name="obj">The obj.</param>
        void SaveAsync(string objId, T obj);

        /// <summary>
        /// Gets the specified object.
        /// </summary>
        /// <param name="objId">The object id.</param>
        /// <returns>The object.</returns>
        T Get(string objId);
        /// <summary>
        /// Gets all objects.
        /// </summary>
        /// <returns>The objects.</returns>
        IEnumerable<T> GetAll();
        /// <summary>
        /// Gets the URI of the blob container.
        /// </summary>
        /// <param name="objId">The object id.</param>
        /// <returns>The URI of the blob container.</returns>
        Uri GetUri(string objId);
        /// <summary>
        /// Deletes the specified object.
        /// </summary>
        /// <param name="objId">The object id.</param>
        void Delete(string objId);

        /// <summary>
        /// Deletes the container.
        /// </summary>
        void DeleteContainer();

    }
}